package net.seehealth.healthpad.dataaccess;

import android.content.ContentValues;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;
import android.nfc.NfcAdapter.CreateNdefMessageCallback;
import android.util.Log;

public class HealthSqliteHelper extends SQLiteOpenHelper {
	private Context context = null;
	private final static int VERSION = 1;
	public final static String DATABASENAME = "seehealth.db";
	private final String TAG = "HealthSqliteHelper";
	public HealthSqliteHelper(Context context, CursorFactory factory,
			int version) {
		super(context,context.getFileStreamPath(DATABASENAME).getAbsolutePath(), factory, version);
	}
	public HealthSqliteHelper(Context context) {
		super(context, context.getFileStreamPath(DATABASENAME).getAbsolutePath(), null, VERSION);
		this.context = context;
	}
	@Override
	public void onCreate(SQLiteDatabase db) {
		// 第一个版本的时候会调用该方法
		Log.i(TAG, "--------创建database------");
		//CreatTable.createtables(context, db);
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int arg1, int arg2) {
		
		// 数据库操作（修改）
		Log.i(TAG,"--------升级database------");
	}
}
